import request from "@/utils/request";
import { ResGgmList, ResGgmAddParams, ResGgmEditParams } from "./model";

// 获取剧本列表
export const reqGgmList = (data: PageQuery) => {
  return request<any, PageResult<ResGgmList[]>>({
    url: "/admin/script",
    params: data,
  });
};

// 添加剧本
export const reqGgmAdd = (data: ResGgmAddParams) => {
  return request({
    url: "/admin/scriptCreate",
    method: "post",
    data,
  });
};

// 编辑剧本
export const reqGgmEdit = (data: ResGgmEditParams) => {
  return request({
    url: "/admin/scriptUpdate",
    method: "post",
    data,
  });
};

// 删除剧本
export const reqGgmDel = (mmg_id: number) => {
  return request({
    url: "/admin/scriptDelete",
    params: { mmg_id },
  });
};
